package com.heima.utils.threadLocal;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocalUtil {
    private static final ThreadLocal<WmUser> WM_USER_THREAD_LOCAL=new ThreadLocal<>();

    /**
     * 存值
     * @param wmUser
     */
    public static void SetWmUser(WmUser wmUser){
        WM_USER_THREAD_LOCAL.set(wmUser);
    }

    /**
     * 取值
     * @return
     */
    public static WmUser getWmUser(){
      return   WM_USER_THREAD_LOCAL.get();
    }

    /**
     * 删除
     */
    public static void delWmUser(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
